Last update: May 2015
This is a sample program that uploads the images in to Facebook from your FlashAir.
lua_sample.zip (5KB)
All sample code on this page is licensed under BSD 2-Clause License
Place the sample program in /lua on your FlashAir. Your directory structure should look something like the following:
/ +-- DCIM/ | +-- 100__TSB/ | +-- 101_FILE/ | +-- JPEG file +-- lua/ | +-- facebook.html | +-- facebook.cfg | +-- fb_auto_up.lua | +-- fb_get_token.lua | +-- fb_token_handler.lua | +-- lastupload.cfg +-- SD_WLAN/ +-- CONFIG
To create an app that will access Facebook, you must be registered as a developer. If you are already registered, skip to the next step!
You’ll need a PC connected to the internet to continue.
Register a new application with Facebook. You’ll need a PC connected to the internet to continue.
Key | Value | Description |
---|---|---|
APPMODE |
6
|
Sets "Internet pass-thru" mode. |
APPSSID |
example) lua_test
|
FlashAir’s SSID |
APPNETWORKKEY |
example) 12345678
|
FlashAir’s WiFi Password |
BRGSSID |
example) my_home_wlan
|
WLAN AP’s SSID |
BRGNETWORKKEY |
example) password12345678
|
WLAN AP’s Password |
APPAUTOTIME |
0
|
Disables the automatic timeout of the FlashAir’s network. |
WEBDAV |
2
|
WebDAV |
var appId = "475125929999999";
app_access_token=475125929999999|qDhN3XeXxXxXxXxXxXxXxXxXxXx
app_secret=859ac999999999999999999999999999
app_id=475125929999999
token_fullpath=/lua/fb_access_token
lastupload=1000001
Key | Value | Description |
---|---|---|
APPMODE |
5
|
Sets Station Mode |
APPSSID |
example) my_home_wlan
|
WLAN AP SSID |
APPNETWORKKEY |
example) password12345678
|
WLAN AP Password |
LUA_RUN_SCRIPT |
example) /lua/fb_auto_up.lua
|
Run the FB uploader script on boot! |